/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.diplomka.datalayer.entity;

import cz.fi.muni.diplomka.common.enumeration.ResourceType;
import java.util.Objects;

/**
 * Class representing Shop Offer Entity
 *
 * @author Jakub Kutil
 */
public class ShopOfferEntity {

    private Long id;
    private Long playerId;
    private Long cityId;
    private ResourceType soldResource;
    private int soldResourceCount;
    private ResourceType wantedResource;
    private int wantedResourceCount;

    public ShopOfferEntity() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPlayerId() {
        return playerId;
    }

    public void setPlayerId(Long playerId) {
        this.playerId = playerId;
    }

    public Long getCityId() {
        return cityId;
    }

    public void setCityId(Long cityId) {
        this.cityId = cityId;
    }

    public ResourceType getSoldResource() {
        return soldResource;
    }

    public void setSoldResource(ResourceType soldResource) {
        this.soldResource = soldResource;
    }

    public int getSoldResourceCount() {
        return soldResourceCount;
    }

    public void setSoldResourceCount(int soldResourceCount) {
        this.soldResourceCount = soldResourceCount;
    }

    public ResourceType getWantedResource() {
        return wantedResource;
    }

    public void setWantedResource(ResourceType wantedResource) {
        this.wantedResource = wantedResource;
    }

    public int getWantedResourceCount() {
        return wantedResourceCount;
    }

    public void setWantedResourceCount(int wantedResourceCount) {
        this.wantedResourceCount = wantedResourceCount;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 17 * hash + Objects.hashCode(this.id);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ShopOfferEntity other = (ShopOfferEntity) obj;
        if (!Objects.equals(this.id, other.id)) {
            return false;
        }
        return true;
    }
}
